﻿using System;
using UnityEngine;

// Token: 0x020001BA RID: 442
public class CutAct_IK : CutAction
{
	// Token: 0x06000B78 RID: 2936 RVA: 0x00043528 File Offset: 0x00041728
	public CutAct_IK(CutScene cutScene) : base(cutScene, CUTACT.IK)
	{
	}

	// Token: 0x06000B79 RID: 2937 RVA: 0x0004358C File Offset: 0x0004178C
	public override object Clone()
	{
		return new CutAct_IK(this.cutScene);
	}

	// Token: 0x06000B7A RID: 2938 RVA: 0x0004359C File Offset: 0x0004179C
	public override void Load(TagText.Element element, int order)
	{
		base.Load(element, order);
		element.GetVal(ref this.chara, "chara", 0);
		element.GetVal(ref this.handR_Tgt, "handR", 0);
		element.GetVal(ref this.handR_Nul, "handR", 1);
		element.GetVal(ref this.handL_Tgt, "handL", 0);
		element.GetVal(ref this.handL_Nul, "handL", 1);
		element.GetVal(ref this.tin_Tgt, "tin", 0);
		element.GetVal(ref this.tin_Nul, "tin", 1);
	}

	// Token: 0x06000B7B RID: 2939 RVA: 0x00043638 File Offset: 0x00041838
	public override void Save(TagText.Element element)
	{
		base.Save(element);
		element.AddAttribute("chara", this.chara);
		if (this.handR_Tgt.Length > 0)
		{
			element.AddAttribute("handR", this.handR_Tgt);
			if (this.handR_Nul.Length > 0)
			{
				element.AddAttribute("handR", this.handR_Nul);
			}
		}
		if (this.handL_Tgt.Length > 0)
		{
			element.AddAttribute("handL", this.handL_Tgt);
			if (this.handL_Nul.Length > 0)
			{
				element.AddAttribute("handL", this.handL_Nul);
			}
		}
		if (this.tin_Tgt.Length > 0)
		{
			element.AddAttribute("tin", this.tin_Tgt);
			if (this.tin_Nul.Length > 0)
			{
				element.AddAttribute("tin", this.tin_Nul);
			}
		}
	}

	// Token: 0x06000B7C RID: 2940 RVA: 0x0004372C File Offset: 0x0004192C
	public override void Action(bool skip)
	{
		Human human = this.cutScene.GetHuman(this.chara);
		if (this.handR_Tgt.Length > 0)
		{
			Human human2 = this.cutScene.GetHuman(this.handR_Tgt);
			if (human2 != null)
			{
				Transform target = Transform_Utility.FindTransform(human2.body.Anime.transform, this.handR_Nul);
				human.ik.SetIK(IK_Data.PART.HAND_R, target, 0f);
			}
			else
			{
				human.ik.ClearIK(IK_Data.PART.HAND_R);
			}
		}
		if (this.handL_Tgt.Length > 0)
		{
			Human human3 = this.cutScene.GetHuman(this.handL_Tgt);
			if (human3 != null)
			{
				Transform target2 = Transform_Utility.FindTransform(human3.body.Anime.transform, this.handL_Nul);
				human.ik.SetIK(IK_Data.PART.HAND_L, target2, 0f);
			}
			else
			{
				human.ik.ClearIK(IK_Data.PART.HAND_L);
			}
		}
		if (this.tin_Tgt.Length > 0)
		{
			Human human4 = this.cutScene.GetHuman(this.tin_Tgt);
			if (human4 != null)
			{
				Transform target3 = Transform_Utility.FindTransform(human4.body.Anime.transform, this.tin_Nul);
				human.ik.SetIK(IK_Data.PART.TIN, target3, 0f);
			}
			else
			{
				human.ik.ClearIK(IK_Data.PART.TIN);
			}
		}
	}

	// Token: 0x04000BBE RID: 3006
	public string chara = string.Empty;

	// Token: 0x04000BBF RID: 3007
	public string handR_Tgt = string.Empty;

	// Token: 0x04000BC0 RID: 3008
	public string handR_Nul = string.Empty;

	// Token: 0x04000BC1 RID: 3009
	public string handL_Tgt = string.Empty;

	// Token: 0x04000BC2 RID: 3010
	public string handL_Nul = string.Empty;

	// Token: 0x04000BC3 RID: 3011
	public string tin_Tgt = string.Empty;

	// Token: 0x04000BC4 RID: 3012
	public string tin_Nul = string.Empty;
}
